/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package view;
import javafx.scene.Group;
import javafx.scene.shape.Rectangle;
import javafx.scene.paint.Color;
import javafx.scene.shape.StrokeLineCap;
import javafx.scene.image.ImageView;
import javafx.scene.image.Image;
import javafx.scene.layout.LayoutInfo;

/**
 * @author Sik
 */

public class CardPlace extends Group
{
    public-init var height : Integer;
    public-init var width : Integer;
    public var url : String;
    public var border : Rectangle =
    Rectangle
    {
        height: height
        width: width
        arcWidth: 20 arcHeight: 20
        fill: null
        stroke: Color.BLACK
        strokeWidth: 4
        strokeLineCap: StrokeLineCap.ROUND
    }

    public var pic : ImageView =
    ImageView
    {
        translateX: 7
        translateY: 7
        image : bind Image
        {
            url : url
            width: width - 15
            preserveRatio: true
        }
    }


    init
    {
        content =
            [
                border,
                pic
            ]
    }
}
